package br.com.naybee.client.views.base;

import br.com.naybee.client.views.add.menu.automacao.MenuView;
import br.com.naybee.framework.client.componente.gwt.root.Panel;

import com.google.gwt.user.client.ui.Widget;

public final class Principal {

	private static final Principal PRINCIPAL = new Principal();
	private BodyView bodyView;
	private HeadView headView;

	private Principal() {
		bodyView = new BodyView();
		headView = new HeadView();
	}

	public static void init() {
		Panel.add(PRINCIPAL.headView, false);
		Panel.add(PRINCIPAL.bodyView, false);
		PRINCIPAL.bodyView.add(new MenuView());
	}

	public static Principal get() {
		return PRINCIPAL;
	}

	public void add(Widget widget) {
		PRINCIPAL.bodyView.add(widget);
	}

}
